]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
bluetooth: Parse pins starting with 0 correctly
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 2 Nov 2013 21:55:48 +0000 (17:55 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sat, 2 Nov 2013 21:55:54 +0000 (17:55 -0400)
If we have a numeric PIN that starts with 0, it will be treated
as an octal number rather than a number that just starts with 0.

js/ui/status/bluetooth.js

index ce0aa024555c266b4b8ca863912b0057edae10b2..4b74b2396bba9e7c9397db0ce355f86534e0ba1c 100644 (file)
@@ -228,7 +228,7 @@ const PinNotification = new Lang.Class({
 
     _ok: function() {
         if (this._numeric) {
-            let num = parseInt(this._entry.text);
+            let num = parseInt(this._entry.text, 10);
             if (isNaN(num)) {
                 // user reply was empty, or was invalid
                 // cancel the operation